// $.ajaxPrefilter
$.ajaxPrefilter(function (option) {
    option.url = 'http://localhost:3006' + option.url;

    if (option.url.indexOf('/my/') > -1) {
        option.headers = {
            Authorization: localStorage.getItem('token')
        };
        option.complete = function (xhr) {
            if (xhr.responseJSON.status == 1 && xhr.responseJSON.message == '身份认证失败') {
                localStorage.removeItem("token")
                return location.href = '/login.html'
            }
        }
    }
})